<template>
  <div class="wapper">
    <div class="main">
      <!-- <ManageExperiment v-if="pageKey === 1" /> -->
      <LineLossAnalysis v-if="pageKey === 2" />
      <My v-if="pageKey === 3" />
    </div>
    <Footer @changePageKey="changePageKey" />
  </div>
</template>

<script setup lang="ts">
import LineLossAnalysis from "@/views/LineLossAnalysis/index.vue"
import My from "@/views/My/index.vue"
// import ManageExperiment from "@/views/ManageExperiment/index.vue"
import Footer from "./Footer.vue"
import { setSession, getSession } from "@/util/tools"

const pageKey = ref(2)

onMounted(() => {
  const page = getSession("pageKey")
  if (page) {
    pageKey.value = page
  }
})

const changePageKey = (value) => {
  pageKey.value = value
  setSession("pageKey", value)
}
</script>

<style scoped lang="less">
@import "./index.less";
</style>
